﻿<phone:PhoneApplicationPage 
    x:Class="Fart7.MainPage"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="768"
    shell:SystemTray.IsVisible="True">
    <phone:PhoneApplicationPage.Resources>
        <Style x:Key="FireStyle" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Grid>
                            <VisualStateManager.VisualStateGroups>
                                <VisualStateGroup x:Name="CommonStates">       
                                    <VisualState x:Name="Pressed">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.StrokeThickness)">
                                                <EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="6"/>
                                            </DoubleAnimationUsingKeyFrames>
                                            <ObjectAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(FrameworkElement.Margin)">
                                                <DiscreteObjectKeyFrame KeyTime="00:00:00.1000000">
                                                    <DiscreteObjectKeyFrame.Value>
                                                        <Thickness>2,2,3,4</Thickness>
                                                    </DiscreteObjectKeyFrame.Value>
                                                </DiscreteObjectKeyFrame>
                                            </ObjectAnimationUsingKeyFrames>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.1"/>
                                            </DoubleAnimationUsingKeyFrames>
                                        </Storyboard>
                                    </VisualState>
                                    <VisualState x:Name="Disabled">
                                        <Storyboard>
                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Duration="00:00:00.0010000" Storyboard.TargetName="ellipse1" Storyboard.TargetProperty="(UIElement.Opacity)">
                                                <EasingDoubleKeyFrame KeyTime="00:00:00" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>

                                            <DoubleAnimationUsingKeyFrames BeginTime="00:00:00" Storyboard.TargetName="ellipse" Storyboard.TargetProperty="(Shape.StrokeThickness)">
                                                <EasingDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0"/>
                                            </DoubleAnimationUsingKeyFrames>

                                        </Storyboard>
                                    </VisualState>
                                </VisualStateGroup>
                                <VisualStateGroup x:Name="FocusStates">
                                    <VisualState x:Name="Focused"/>
                                    <VisualState x:Name="Unfocused"/>
                                </VisualStateGroup>
                            </VisualStateManager.VisualStateGroups>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.08*"/>
                                <RowDefinition Height="0.84*"/>
                                <RowDefinition Height="0.08*"/>
                            </Grid.RowDefinitions>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="0.08*"/>
                                <ColumnDefinition Width="0.84*"/>
                                <ColumnDefinition Width="0.08*"/>
                            </Grid.ColumnDefinitions>
                            <Ellipse Grid.ColumnSpan="3" Grid.RowSpan="3" Margin="1,1,1,1" Stroke="#FF8C8C8C">
                                <Ellipse.Fill>
                                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                        <GradientStop Color="#FF343434" Offset="0.63"/>
                                        <GradientStop Color="#FFFFFFFF" Offset="0.158"/>
                                        <GradientStop Color="#FFB3B3B3" Offset="1"/>
                                        <GradientStop Color="#FFE0E0E0" Offset="0"/>
                                    </LinearGradientBrush>
                                </Ellipse.Fill>
                            </Ellipse>
                            <Grid Grid.Column="1" Grid.ColumnSpan="1" Grid.Row="1" Grid.RowSpan="1">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="0.033*"/>
                                    <RowDefinition Height="0.6*"/>
                                    <RowDefinition Height="0.367*"/>
                                </Grid.RowDefinitions>
                                <Grid.ColumnDefinitions>
                                    <ColumnDefinition Width="0.114*"/>
                                    <ColumnDefinition Width="0.772*"/>
                                    <ColumnDefinition Width="0.114*"/>
                                </Grid.ColumnDefinitions>
                                <Ellipse StrokeThickness="2" VerticalAlignment="Stretch" Grid.ColumnSpan="3" Grid.RowSpan="3" x:Name="ellipse" Fill="{TemplateBinding Background}">
                                    <Ellipse.Stroke>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#FF6A6A6A" Offset="0"/>
                                            <GradientStop Color="#FFFFFFFF" Offset="0.482"/>
                                            <GradientStop Color="#FF515151" Offset="1"/>
                                        </LinearGradientBrush>
                                    </Ellipse.Stroke>
                                </Ellipse>
                                <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" Grid.ColumnSpan="3" Grid.RowSpan="3"/>
                                <Ellipse Stroke="#FF000000" StrokeThickness="0" HorizontalAlignment="Stretch" Margin="0,0,0,0" VerticalAlignment="Stretch" Width="Auto" Height="Auto" Grid.Column="1" Grid.Row="1" x:Name="ellipse1">
                                    <Ellipse.Fill>
                                        <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                            <GradientStop Color="#D8FFFFFF" Offset="0"/>
                                            <GradientStop Color="#15FFFFFF" Offset="0.845"/>
                                        </LinearGradientBrush>
                                    </Ellipse.Fill>
                                </Ellipse>
                            </Grid>
                        </Grid>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Setter Property="FontSize" Value="18.667"/>
        </Style>
    </phone:PhoneApplicationPage.Resources>

    <!--LayoutRoot contains the root grid where all other page content is placed-->
    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="24,24,0,12">
            <TextBlock x:Name="ApplicationTitle" Text="Shai Raiten" Style="{StaticResource PhoneTextNormalStyle}"/>
            <TextBlock x:Name="PageTitle" Text="Fart With 7" Margin="-3,-8,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentGrid" Grid.Row="1">
            <ListBox x:Name="MainList" Margin="8,8,8,170">
                <ListBox.ItemTemplate>
                    <DataTemplate>
                        <Canvas Height="53" Width="278">
                            <Rectangle Height="49" Stroke="White" Width="242" Opacity="0.7" RadiusX="17" RadiusY="17" StrokeThickness="2" Canvas.Top="10" Fill="Black" Canvas.Left="8"/>
                            <TextBlock Height="44" TextWrapping="Wrap" Text="{Binding Name}" Width="221" Canvas.Left="20" Canvas.Top="8" FontSize="29.333"/>
                            <Rectangle Height="49" Stroke="White" Width="74" Opacity="0.7" RadiusX="17" RadiusY="17" StrokeThickness="2" Canvas.Top="10" Fill="Black" Canvas.Left="254"/>
                            <TextBlock Height="44" TextWrapping="Wrap" Text="{Binding Duration}" Width="58" Canvas.Left="263" Canvas.Top="13" FontSize="22"/>
                            <Rectangle Height="49" Stroke="White" Width="74" Opacity="0.7" RadiusX="17" RadiusY="17" StrokeThickness="2" Canvas.Top="10" Fill="Black" Canvas.Left="334"/>
                            <TextBlock Height="44" TextWrapping="Wrap" Text="{Binding Format}" Width="58" Canvas.Left="343" Canvas.Top="13" FontSize="22"/>
                        </Canvas>
                    </DataTemplate>
                </ListBox.ItemTemplate>
            	
            </ListBox>
            <Button Name="btn_fart" Click="btn_fart_Click" Content="FART FIRE!" Height="158" Style="{StaticResource FireStyle}" VerticalAlignment="Center" FontFamily="Segoe WP" Margin="153,453,156,6" FontSize="26" >
            	<Button.Background>
            		<LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
            			<GradientStop Color="Black" Offset="0"/>
            			<GradientStop Color="Red" Offset="1"/>
            		</LinearGradientBrush>
            	</Button.Background>
            </Button>
            <Button Content="About" FontFamily="Segoe WP" FontSize="18" Height="109" HorizontalAlignment="Right" Margin="0,504,12,4" Name="button1" Style="{StaticResource FireStyle}" VerticalAlignment="Center" Width="120" Click="button1_Click">
                <Button.Background>
                	<LinearGradientBrush EndPoint="0.5,1" MappingMode="RelativeToBoundingBox" StartPoint="0.5,0">
                		<GradientStop Color="Black" Offset="0"/>
                		<GradientStop Color="#FF1FFF00" Offset="1"/>
                	</LinearGradientBrush>
                </Button.Background>
            </Button>
            <Button Content="Back" FontFamily="Segoe WP" FontSize="18" Height="109" HorizontalAlignment="Left" Margin="8,502,0,6" Name="button2" Style="{StaticResource FireStyle}" VerticalAlignment="Center" Width="120" Click="button2_Click">
                <Button.Background>
                    <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                        <GradientStop Color="Black" Offset="0" />
                        <GradientStop Color="#FFFFF500" Offset="1" />
                    </LinearGradientBrush>
                </Button.Background>
            </Button>
        </Grid>
    </Grid>
</phone:PhoneApplicationPage>
